from fastapi import FastAPI
from app.path_parameter import path_parameter
from app.query_parameter import query_parameter
from app.request_body import request_body
from app.form_parameter import form_parameter
from app.file_upload import file_upload
from app.request_param import request_param
from app.response_mode import response_mode
import uvicorn
from fastapi.staticfiles import StaticFiles
app = FastAPI()

app.mount("/static", StaticFiles(directory="statics"), name="static")

app.include_router(path_parameter,prefix="/path", tags=["1. 路径参数"])
app.include_router(query_parameter,prefix="/query", tags=["2. 查询参数"])
app.include_router(request_body,prefix="/request", tags=["3. 请求体"])
app.include_router(form_parameter,prefix="/form", tags=["4. 表单参数"])
app.include_router(file_upload,prefix="/file", tags=["5. 文件上传"])
app.include_router(request_param,prefix="/request_param", tags=["6. 请求参数"])
app.include_router(response_mode,prefix="/response", tags=["7. 响应模式"])

if __name__ == "__main__":
    uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)

